<extend name="_Layout/layout"/>
<block name="style">
<style type="text/css">
			[class*=am-u-]{padding-left:0;padding-right: 0;}
			ol, ul{padding: 0; margin: 0;}
			.m-middlem{ margin-bottom: 50px;}
			.m-middlem h2{color: #000; margin-bottom: 0; padding: 20px 0 10px 0;  font-size: 22px;}
			.m-middlem .con{ height: auto; overflow: hidden;}
			.m-middlem .con p{ line-height: 35px; font-size: 14px; color: :#ccc; margin: 3px 0; text-indent: 2em;}
			.m-middlem .con img{ display: block; width: auto; max-width: 100%; margin: 15px auto;}
			.m-middlem  h3 span{ font-size: 13px; padding-right: 20px;}
			.m-middlem  h3{border-bottom: 1px solid #e5e5e5; margin-top: 0; padding-bottom: 20px;}
</style>
</block>
 <block name="main">			
		<div class="raise right clearfix">
            <script type="text/javascript" src="js/jquery.zclip.min.js"></script>
<div class="ybc_list">
                <div class="ybcoin invitecon" style="border-bottom:1px solid #e2e2e2;">
                    <h2 class="left"><font style="color:red;font-size:14px;">邀请好友注册</font></h2>
                    <div class="clear"></div>
                </div>
                <div class="ybcoin invitecon" style="margin-bottom:0;">
                     <h2>复制以下内容发送给你的好友<span style="margin-left:20px;color:red;">您的邀请码是: {$uname}</span></h2>
                    <div>
                        <div class="left invitelink">
                            <textarea name="url" id="copytuijian" value="" style="width: 600px;">币交所，综合数字资产交易平台!我们拥有领先的技术实力、优质的客户服务和良好的用户体验，为广大数字货币爱好者提供一个自由的网上交换的平台。http://jys.w1118.iyumi.pw/{$uname}</textarea>
                        </div>
                        <p class="right copylink" style="text-indent:0;"><a id="copyUrl" onclick="copyUrl2()">复制推广链接：</a><div class="zclip" id="zclip-ZeroClipboardMovie_1" style="position: absolute; left: 930px; top: 252px; width: 122px; height: 42px; z-index: 99;"><embed id="ZeroClipboardMovie_1" src="/js/jquery/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="122" height="42" name="ZeroClipboardMovie_1" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=1&amp;width=122&amp;height=42" wmode="transparent"></div></p>
                        <div class="clear"></div>
                    </div>
                </div>
                <div class="ybcoin invitecon" style="display:none">
                    <h3 style="height:28px;">把内容分享到以下空间</h3>
                  <div class="bdsharebuttonbox">
				  <a href="#" class="bds_more" data-cmd="more"></a>
				  <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
				  <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
				  <a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a>
				  <a href="#" class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a>
				  <a href="#" class="bds_linkedin" data-cmd="linkedin" title="分享到linkedin"></a>
				  <a href="#" class="bds_twi" data-cmd="twi" title="分享到Twitter"></a>
				  </div>
<script>
window._bd_share_config={"common":{"bdSnsKey":{},
                                   
				   "bdText":"金元宝活期理财年化收益8%+理财积分收益，50元起投、当天计息、随时赎回、本息保障，新用户手机APP注册就送新人大礼包，还有机会获得5000元大奖！快来元宝理财开启财富生活吧！
",

                   "bdUrl":"https://www.yuanbao.com/DBKyH3",
				   "bdMini":"2",
				   "bdMiniList":false,
				   "bdPic":"",
				   "bdStyle":"0",
				   "bdSize":"32"},
                   "share":{},
			       "image":{"viewList":["tsina","tqq","douban","weixin","linkedin","fbook","twi"],
                                  "viewText":"金元宝活期理财年化收益8%+理财积分收益，50元起投、当天计息、随时赎回、本息保障，新用户手机APP注册就送新人大礼包，还有机会获得5000元大奖！快来元宝理财开启财富生活吧！","viewSize":"16"},
                                  "selectShare":{"bdContainerClass":null,"bdSelectMiniList":["tsina","tqq","douban","weixin","linkedin","fbook","twi"]}};
 with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
                </div>
                <div class="ybcoin invitecon" style="display:none">
                    <h2>或者发送至</h2>
                    <div>
                       <input id="emaillist" type="text" class="left email_link" placeholder="example@example.com, 不超过5个, 以 ; 隔开"> 
                        <p class="right copylink" style="text-indent:0;"><input type="button" class="email_invite" value="发邮件邀请" onclick="sendmail()"></p>
                        <div class="clear"></div>
                        
                    </div>
                </div>
                <div class="ybcoin invitecon">
                    <h2>邀请规则</h2>
                    <ul class="rules">
                        <li>1.如果同一用户被多名币交所用户邀请，币交所将认定第一位确定的邀请人为该用户邀请人</li>
                        <li>2.禁止通过作弊手段进行虚假邀请注册骗取返利，一经发现将取消奖励并酌情处理</li>
                      
                        <div class="clear"></div>
                    </ul>
                </div>
            </div>
            <div class="ybc_list">
                    <div class="ybcoin">
                        <h2 class="left">我的邀请</h2><!--<h2 class="right">昨日推荐总理财金额: <span style="color:#f60;">0</span></h2>-->
                    </div>
                    <table cellspacing="0" cellpadding="0" border="0" class="raise_list" align="center" style="border:1px solid #e1e1df;">
                        <thead>
                            <tr class="list_head">
                            <th>会员编号</th>
								<th>真实姓名</th>
                                <th>邮箱</th>
                                <th>电话</th>
								
				                <th>注册时间</th>
                               
                                <!-- <th>操作</th> -->
                            </tr>
                           <volist name="list" id="vo">
                            <tr>
                            <td>{$vo.username}</td>
                            <td>{$vo.realname}</td>
                            <td>{$vo.email}</td>
                            <td>{$vo.mobile|}</td>
                            <td>{$vo.ctime|time_format}</td>
                            </tr>
                            </volist>
                            
                        </thead>
                        <tbody>
                       </tbody>
                </table>
            </div>
        </div>
      
<script type="text/javascript">
   $(document).ready(function(){
       $("#copy").zclip({
           path: "/js/jquery/ZeroClipboard.swf",
           copy: function(){
               return $('#url').val();
           }
      });
  });

  function sendmail(){
    var emailList = $('#emaillist').val();
        if(emailList.replace(/\s/g,'') === ''){
            alert("请填写邮箱内容");
            return false;
        }else{
            var arr = escape(emailList.replace(/(^\s*)|(\s*$)/g,"")).split('%3B'), error = '' , emailrule = /\w+((-w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+/;
            if(arr.length > 5 && arr.length){
                alert("最多填写5个邮箱");
                return false;
            }else{
                for (var i = 0 ; i < arr.length; i ++){
                    if(!emailrule.test(arr[i])){
                        var num = i + 1;
                        error += num+"、";
                    };
                }
            };
            if(error != ''){
                error = error.substr(0,error.length-1);
                alert("第"+error+"个邮箱格式不正确");
                return false;
            };
            $.post('invite',{ emails: emailList },function(data){
                if(data)
                {
                    var str = "";
                    if(data.reg.length>0){
                        str += data.reg+"邮箱已注册";
                    }
                    if(data.invite.length>0){
                        str += data.invite+"邮箱已邀请";
                    }
                    if(str.length>0){
                        alert(str);
                        return false;
                    }
                    else{
                        alert('邀请成功');
                        window.location.reload();
                    }
                }
            },"json");
       }
  }
 function resendEmail(email,inviteid){
        $.post('resendemail/',{ email:email,inviteid: inviteid },function(data){
            if(data){
                alert("邀请已发出");
            }
        });
    };
    function copyUrl2() {
        var Url2 = document.getElementById("copytuijian");
        Url2.select(); // 选择对象
        document.execCommand("Copy"); // 执行浏览器复制命令
        layer.msg("已复制好，可贴粘。");
    }
 </script>
</block>